<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>下单</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<link rel="stylesheet" href="https://static.91haoka.cn/vant.css" />
		<script src="https://static.91haoka.cn/vue.min.js"></script>
		<script src="https://static.91haoka.cn/vantall.js"></script>
		<script src="https://static.91haoka.cn/axios.min.js"></script>
		<link rel="stylesheet" type="text/css" href="https://static.91haoka.cn/all.css" />
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<script src="https://cdn.rockysports.cn/moment.js" type="text/javascript" charset="utf-8"></script>
		
	</head>
	<style type="text/css">
		* {
			box-sizing: border-box;
			font-family: 'PingFang SC';
			font-size: 14px;
		}
		[v-cloak] {
			display: none;
		}

		.center {
			padding: 0.2rem 0;
		}

		.smalltitle {
			color: #3976ff;
			padding: 0.2rem;
			border-bottom: 1px #EAEAEA solid;
			padding-left: 0.5rem;
			font-weight: bold;
			background: url(https://cdn.91haoka.cn/xian.png) no-repeat 0.1rem center;
			background-size: 16px;
		}

		.title {
			border-bottom: 1px #EAEAEA solid;
			line-height: 0.8rem;
			padding: 0 0.2rem;
		}

		.footer img {
			width: 100%;
			display: block;
		}

		.flex {
			display: flex;
		}

		.li {
			line-height: 0.8rem;
			padding: 0 0.5rem;
		}

		.tishi {
			flex-basis: 1.5rem;
			color: #666;
		}

		.neirong {
			flex-basis: 5rem;
			position: relative;
		}

		.van-field__control {
			color: #333;
		}

		.where {
			padding: 0px 16px;
			color: #333;
		}

		.w1 {}

		.code {
			position: absolute;
			right: 0;
			z-index: 98;
			height: 0.5rem;
			font-size: 12px;
		}

		.ps {
			font-size: 12px;
			padding: 0.2rem 0.5rem;
			color: #999;
			line-height: 0.4rem;
		}

		.ps2 {
			font-size: 12px;
			padding: 0.0rem 0.5rem;
			display: flex;
			justify-content: space-between;
			color: #e8b004;
			line-height: 0.4rem;
		}

		.buy {
			padding: 0.2rem 0.5rem;
		}

		.buy button {
			height: 40px;
			line-height: 38px;
		}

		.van-radio {
			margin-bottom: 0.15rem;
		}

		.tc {
			border: 1px #EAEAEA solid;
			padding-left: 0.2rem;
			margin-bottom: 0.1rem;
			line-height: 0.6rem;
			border-radius: 3px;
			background: #FFFFFF;
		}

		.act {
			background: #1989fa !important;
			color: #FFFFFF !important;
		}

		.van-button--disabled {
			background: #FFFFFF;
			color: #1989fa;
		}

		.van-button,
		.van-button--large,
		.buy button {
			height: auto;
			line-height: 25px;
			
		}
		.van-button span{ font-size: 12px;}
		.van-uploader{ width: 100%;height: 100%;}
		.van-uploader__wrapper{ width: 100%;height: 100%;}
		.van-uploader__upload{ width: 100%;height: 100%;}
		
		.taocan{ padding: 0.2rem; border-radius:5px; border:1px #eaeaea solid; text-align:center; margin-bottom:0.2rem;}
		.act{  border:1px #66b9ff solid;}
		
		.van-popup{ background: transparent !important; color: #fff;}
		
		.xuanhao{ background: #fff !important; padding:0 0.2rem !important;}
		.ullist{ padding: 0.2rem 0.2rem;}
		.lili{ border: 1px #EEEEEE solid; padding: 0.2rem; color: #000;  font-weight: bold; width: 3.2rem; margin: 0.1rem 0; text-align: center; border-radius: 0.1rem;}
		.van-action-sheet{max-height: 90%;}
		.van-toast__text{ color:#fff}
		.van-cell:not(:last-child)::after{border-bottom: 0;}
		
		.red{ border-bottom: 1px #f00 solid !important;}
		.hei{ color: #333 !important;}
		
		.red div{ color: #f00;}
		.red span{ color: #f00 !important;}
		.red input::-webkit-input-placeholder{
			color: #f00;
		}
		.t_fanye{
			display: flex;
			font-size: 14px;
			
			justify-content:end;
			width: 100%;
		}
	</style>

	<body>
		<div id="app" style=" min-height: 100vh; padding:0.2rem 0.2rem 1.2rem;" :style="{'background':item.pic}" v-cloak>
			<div class="top">
				<div class="topimg">
					<img :src="item.details">
				</div>
			</div>
			
			<!-- <div class="flex" style="background: #fff; border-radius:5px; padding:0.2rem;">
				<div style="width: 1.8rem; max-height:1.8rem; overflow:hidden;"><img :src="item.pic" class="bor"></div>
				<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
					<div style="font-weight: bold; font-size: 0.32rem;">{{item.sale_name}}</div>
					<div style="text-align: right; font-weight: bold;">￥{{item.price}}</div>
				</div>
			</div> -->
			<div style="background: #fff; border-radius:5px; padding:0.4rem; margin-top:0.2rem; " >
				<div style="font-weight: bold; font-size: 15px; margin-bottom:0.1rem">选择套餐</div>
				<div class="taocan" :class="xuanzhongdeindex == index?'act':''" @click="xuanzhongdeindexg(index)" v-for="(item,index) in item.pages" :key="item.id">{{item.page_name}}</div>
			</div>
			
			<div style="background: #fff; border-radius:5px; padding:5px; margin-top:0.2rem;" v-if="item.take_number == 1">
				<div class="flex" style="align-items: center;padding-left: 0.2rem; " @click="xuanhaokai">
					<div style="width: 1.6rem; overflow:hidden;">选择号码</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem; line-height:44px; position:relative;">
						<div class="where">
							<span v-if="!all.pretty_number" style="color: #9E9E9E;">点击选择号码</span>
							<span v-if="all.pretty_number">
								<span style="font-weight: bold;">{{all.pretty_number.toString().substring(0,3)}}</span>
								<span style="color: #f00; font-weight: bold;">{{all.pretty_number.toString().substring(3,7)}}</span>
								<span style="color:#51A6FF; font-weight: bold;">{{all.pretty_number.toString().substring(7,11)}}</span>
						
							</span>
							
							<van-icon name="arrow" size="14" style="position: absolute; top: 0px; line-height:44px; right:0;" />
						</div>
					</div>
				</div>
			</div>
			
			<div style="background: #fff; border-radius:5px; padding:0.4rem; margin-top:0.2rem;" v-if="peizhi.needidcard == 1 || peizhi.needidcard == undefined">
				<div style="font-weight: bold; font-size: 15px; margin-bottom:0.1rem">个人信息</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">姓名</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<van-field v-model="all.id_name" placeholder="系统已加密，请放心填写" />
					</div>
				</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">身份证号码</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<van-field v-model="all.id_num" placeholder="系统已加密，请放心填写" />
					</div>
				</div>
			</div>
			
			<div style="background: #fff; border-radius:5px; padding:0.4rem; margin-top:0.2rem;">
				<div style="font-weight: bold; font-size: 15px; margin-bottom:0.1rem">配送信息</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;" v-if="!peizhi.shouhuorenxingming">
					<div style="width: 1.8rem; overflow:hidden;">{{peizhi.shouhuot1}}</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<van-field v-model="all.name" placeholder="系统已加密，请放心填写" />
					</div>
				</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">{{peizhi.shouhuot2}}</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<van-field v-model="all.mobile" placeholder="系统已加密，请放心填写" />
					</div>
				</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid; position:relative;" v-if="peizhi.duanxin">
					<div style="width: 1.8rem; overflow:hidden;">验证码</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<div class="code" style="right: 0rem; top:0.2rem; "><van-button type="info" size="small" @click="getcode" type="tel" :disabled="yzmuse" style="font-size: 12px;" >{{yzm}}</van-button></div>
						<van-field v-model="all.code" placeholder="请输入验证码" />
					</div>
				</div>

				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">{{peizhi.shouhuot3}}</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem; line-height:44px; position:relative;" @click="showPopup">
						<div class="where">{{shengshiqu}}
							<van-icon name="arrow" size="14" style="position: absolute; top: 0px; line-height:44px; right:0;" />
						</div>
					</div>
				</div>
				<div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">详细地址</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem;">
						<van-field v-model="all.address" placeholder="请输入详细地址" />
					</div>
				</div>
				<!-- <div class="flex" style="align-items: center; border-bottom:1px #EAEAEA solid;">
					<div style="width: 1.8rem; overflow:hidden;">上传相关证件</div>
					<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038;  text-align:right;">
						<van-icon name="arrow" size="14" style=" line-height:44px;" />
					</div>
				</div> -->
				
				
				<div v-if="peizhi.shenfenzheng">
					<div style="border-bottom:1px #EAEAEA solid; padding:0.3rem 0">
						根据有关部门要求，必须上传真实身份证照片。<span style="color: #f00;">未上传照片，订单无效。</span>
					</div>
					<div class="flex" style="padding: 0.25rem 0;justify-content: space-around;">
						<div style="width: 3rem; background: #f7f8fa;" class="flexcc">
							
							<div style="width: 100%; height: 100%;">
								<van-uploader :after-read="afterRead1"  deletable="false" preview-size="3rem" show-upload="false" >
									<div v-if="all.face_url"><img :src="all.face_url" style="width: 3rem; "></div>
									<div style="width: 100%; height: 100%;" class="flexcc" v-if="!all.face_url"><van-icon name="photograph" color="#999" size="30" /></div>
								</van-uploader>
							</div>
						</div>
						<div style="width: 3rem;" class="flexcc">
							<img src="./img/face.jpg" style="width: 3rem;">
						</div>
					</div>
					<div style="padding: 0.1rem 0.25rem;">证件四角边缘空隙2厘米以上，手机横拍，照片清晰不模糊，无水印，无反光，无PS</div>
					<div class="flex" style="padding: 0.25rem 0;justify-content: space-around;">
						<div style="width: 3rem; background: #f7f8fa;" class="flexcc">
							
							<div style="width: 100%; height: 100%;">
								<van-uploader :after-read="afterRead2"  deletable="false" preview-size="3rem" show-upload="false" >
									<div v-if="all.back_url"><img :src="all.back_url" style="width: 3rem;"></div>
									<div style="width: 100%; height: 100%;" class="flexcc" v-if="!all.back_url"><van-icon name="photograph" color="#999" size="30" /></div>
								</van-uploader>
							</div>
						</div>
						<div style="width: 3rem;" class="flexcc">
							<img src="./img/back.jpg" style="width: 3rem;">
						</div>
					</div>
					<div style="padding: 0.1rem 0.25rem;">证件四角边缘空隙2厘米以上，手机横拍，照片清晰不模糊，无水印，无反光，无PS</div>
					<div class="flex" style="padding: 0.25rem 0;justify-content: space-around;">
						<div style="width: 3rem; background: #f7f8fa;" class="flexcc">
							<div style="width: 100%; height: 100%;">
								<van-uploader :after-read="afterRead3"  deletable="false" preview-size="3rem" show-upload="false" >
									<div v-if="all.hand_url"><img :src="all.hand_url" style="width: 3rem;"></div>
									<div style="width: 100%; height: 100%;" class="flexcc" v-if="!all.hand_url"><van-icon name="photograph" color="#999" size="30" /></div>
								</van-uploader>
							</div>
						</div>
						<div style="width: 3rem;" class="flexcc">
							<img src="./img/head.png" style="width: 3rem;">
						</div>
					</div>
					<div style="padding: 0.1rem 0.25rem;">无需手持身份证，胸部以上，露出双肩，人像面部比例不低于1/3，无水印，无反光，无PS</div>
				</div>
				<div style="font-size: 12px; margin: 0.2rem 0rem; display: flex; flex-wrap: wrap; align-items: center;" v-if="item.network_access_protocol == 1">
					<van-checkbox v-model="checked" style="margin-right: 0.1rem; font-size: 12px;">我已阅读并同意</van-checkbox>
					
					<span style="color: #007AFF;font-size: 12px;" v-for="(item,index) in xieyilist" :key="item.id" @click="dakaixieyi(index)">《{{item.title}}》</span>
					<!-- <span style="color: #007AFF;font-size: 12px;" @click="log1 = true">《客户入网许可协议及服务协议》</span>
					<span style="color: #007AFF;font-size: 12px;" @click="log2 = true">《转卖或转借电话卡风险告知书》</span>
					<span style="color: #007AFF;font-size: 12px;" @click="log3 = true">《个人信息收集证明》</span> -->
				</div>
				
				
				
			</div>
			<div style="background: #fff; border-radius:5px; padding:0.4rem; margin-top:0.2rem; " v-if="peizhi.pinglun == 1 && peizhi.pinglunid && pinglunlist != ''">
				<div style="font-weight: bold; font-size: 15px; margin-bottom:0.3rem;">商品评价</div>
				
				<van-swipe style="height: 140px;" :vertical='true' :autoplay='2000' :show-indicators='false'>
				    <van-swipe-item  v-for="(item,index) in pinglunlist" :key="index">
						<div v-for="item2 in item" :key="item.id">
							<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 10px;">
								<div style="display: flex;  align-items: center;">
									<img :src="item2.header" style="width: 0.5rem; height: 0.5rem; margin-right: 0.2rem; border: 1px #999 solid; border-radius: 1rem;">
									<div style="color: #666;">{{item2.title}}</div>
								</div>
								<div style="color: #999;">{{item2.created_at}}</div>
							</div>
							<div style="padding: 0.1rem 0 0 0.7rem; color: #999;">{{item2.content}}</div>
						</div>
					</van-swipe-item>
				</van-swipe>
			</div>
			<div class="top">
				<div class="topimg">
					<img :src="item.footer">
				</div>
			</div>
			
			<div class="fixed" style="bottom: 0; background: #fff; z-index: 99;">
				<div style="border-bottom: 1px #EAEAEA solid; padding: 0.2rem;" v-if="xuyaozhifu">
					<div class="flexbc" style="padding: 0.2rem 0.3rem;" @click="zhifufangshi(1)">
						<div class="flexc">
							<div><img src="img/weixinzhifu.png" style="width: 0.46rem; margin-right: 0.2rem;"/></div>
							<div>微信支付</div>
						</div>
						
						<div>
							<van-icon name="checked" color="#FF0000" size="20" v-if="all.pay_method == 1 || all.pay_method == 3" ></van-icon>
							<van-icon name="circle" color="#000" size="20" v-if="all.pay_method != 1 && all.pay_method != 3" ></van-icon>
						</div>
					</div>
					<div class="flexbc" style="padding: 0.2rem 0.3rem;" @click="zhifufangshi(2)">
						<div class="flexc">
							<div><img src="img/zhifubaozhifu.png" style="width: 0.46rem; margin-right: 0.2rem;"/></div>
							<div>支付宝支付</div>
						</div>
						
						<div>
							<van-icon name="checked" color="#FF0000" size="20" v-if="all.pay_method == 2" ></van-icon>
							<van-icon name="circle" color="#000" size="20" v-if="all.pay_method != 2" ></van-icon>
						</div>
					</div>
				</div>
				<div class="flexbc">
					<div class="flexcc" style="padding: 0.3rem; font-size: 0.26rem;">
						福利价：
						<div style="color: #FF3400;">
							<span style="font-size: 0.35rem;" v-if="item.pages != '' && xuanzhongdeindex != -1">￥{{item.pages[xuanzhongdeindex].unit_price}}</span>
							<span style="font-size: 0.35rem;" v-if="item.pages == '' || xuanzhongdeindex == -1">请先选择商品</span>
						</div>
					</div>

<!-- 					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="tijiaoing" @click="tijiao">提交订单</div>
					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="!tijiaoing">提交订单中...</div> -->
					
					<!-- <div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="tijiaoing && item.pages[xuanzhongdeindex].unit_price == 0" @click="tijiao">提交订单</div>
					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="tijiaoing && item.pages[xuanzhongdeindex].unit_price != 0" @click="tijiaofukuan">支付并提交</div>
					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="!tijiaoing">提交订单中...</div> -->
					
					
					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="xuanzhongdeindex != -1 && item.pages[xuanzhongdeindex].unit_price == 0" @click="tijiao">提交订单</div>
					<div style="background: #FF3400;  padding: 0.3rem 0.5rem; color: #fff; font-size: 0.3rem;" v-if="xuanzhongdeindex != -1 && item.pages[xuanzhongdeindex].unit_price != 0" @click="tijiao">选择支付方式</div>
					
					
				</div>
			</div>
			<van-overlay :show="zhifudeshow" @click="zhifudeshowclose" ></van-overlay>
			<div v-html="payGateWay" ref="alipayWap"></div>

			<van-popup v-model="show" position="bottom">
				<van-area :area-list="areaList" :columns-placeholder="['请选择', '请选择', '请选择']" @confirm="queren" @cancel="quxiao" />
			</van-popup>
			<van-popup v-model="log1" style="width: 90%; height: 60vh;  padding: 0.3rem;">
				<div class="fz" v-html="log1html">
					
				</div>
			</van-popup>
			<van-popup v-model="log2" style="width: 90%; height: 60vh;  padding: 0.3rem;">
				<div style="font-size: 12px;">
					《转卖或转借电话卡风险告知书》</br>
					尊敬的用户：</br>
					尊敬的用户：根据《中华人民共和国反恐怖主义法》、《中华人民共和国网络安全法》、《全国人民代表大会常务委员会关于加强网络信息保护的决定》、《电信和互联网用户个人信息保护规定》（工业和信息化部令第24号）、
					《电话用户真实身份信息登记规定》（工业和信息化部令第25 号）等法律法规及规定的相关要求，用户在中国移动、中国电信、中国联通各类营业网点（含自有营 业厅、网上营业厅、授权零售代销渠道）办理固定电话、
					移动电话（含无线上网卡）入网、过户等业务，以及其他需要如实登记用户真实身份信息的业务时，必须出示有效证件原件，并按规定进行用户信息核验或登记，登记的信息包括姓名、证件类型、号码及地址等，
					同时，为更好地提供服务，需要用户提供如联系人、联系电话、通信地址、电子邮箱等信息用户可以通过我公司自有营业厅或指定的其他渠道查询和/或更正本人信息，如用户拒绝依法提供个人有效证件以及真实身份等信息
					，或冒用他人的证件，或者使用伪造、变造证件，我公司有权不提供服务或终止服务。</br>
					为向用户提供优质、个性化的服务，包括但不限于提供通信服务、保障通信服务安全、改善服务质量、推介个性化产品，我公司将遵循合法、正当、必要的原则，通过业务受理系统登记、纸质返档，以及网络接收、读取并记录等方式，
					按照法律法规规定以及协议约定收集、使用用户个人信息，包括用户提供的信息、用户使用服务过程中产生的信息我公司严格按照法律法规的相关要求，建立信息安全保障制度，采取技术措施和其他必要措施保护用户的个人信息安全。</br>
					我公司非因下列事由，不会对外披露用户个人信息∶ 1、事先获得用户明确同意；2、根据有关法律法规规定要求；3、根据有关司法机关和/或政府主管部门的强制性要求；
					4、为维护国家安全、公共安全的利益所必需且适当；
					5、为维护我公司或用户的合法权益所必需且适当。</br>
				</div>
			</van-popup>
			<van-popup v-model="log3" style="width: 90%; height: 60vh;  padding: 0.3rem;">
				<div style="font-size: 12px;">
					《个人信息收集证明》</br>
					尊敬的用户：</br>
					根据《中华人民共和国反恐怖主义法》、《全国人 民代表大会常务委员会关于加强网络信息保护的决 定》、《电信和互联网用户个人信息保护规定》
					（工业和信息化部令第24号）和《电话用户真实 身份信息登记规定》（工业和信息化部令第25 号）等国家法律法规的要求，客户在中国电信公司 各类营业网点（含自有营业厅、手机营业厅、网上
					营业厅、授权合作代理商等）办理固定电话、
					移动电话（含无线上网卡）入网、过户以及需要出示客户证件的有关业务时，客户应配合出示有效证件原件并进行查验、登记，登记信息包括姓名、证件类型、号码及地址等。同时，为更好地提供服务，需要客户提供如联系人、
					联系电话、通信地址、电子邮箱等信息。客户本人持有效证件可通过自有营业厅查询和/或更正本人信息，或登录手机营业厅查询本人信息。
					如客户拒绝依法提供个人有效证件及真实信息，我公司有权不提供服务或终止服务。为向客户提供优质、
					个性化的服务，包括但不限于提供通信服务、保障通信服务安全、改善服务质量、推介个性化产品等，我公司将遵循合法、正当、必要的原则，按照法律法规规定和/或协议约定使用留存客户个人信息，并妥善保管，严格保密，依法保护客户个人信息，
					非因下列事由，不对外泄露客户个人信息∶（a）事先获得客户的明确授权;（b）根据有关的法律法规要求; （c）按照相关司法机关和/或政府主管部门的要求;
					（d）为维护社会公众的利益所必需且适当;（e）为维护我公司或客户的合法权益所必需且适当。
				</div>
			</van-popup>
			<!-- <van-popup v-model="show2" position="bottom"
				style="padding: 0.4rem 0.3rem; color: #2D3038; border-radius: 0.2rem 0.2rem 0 0;">
				<div class="flexb" style="font-size: 0.32rem; font-weight: bold;">
					<div style="font-size: 0.32rem; font-weight: bold;">确认订单信息</div>
					<div @click="show2 = false"><img src="img/g.png" style="width: 0.32rem;"></div>
				</div>
				<div class="flexb" style="margin-top: 0.3rem;">
					<div style="color: #8A919F;  font-size: 0.25rem;">商品名称</div>
					<div style="font-size: 0.25rem;">{{person.sale_name}}</div>
				</div>
				<div class="flexb" style="margin-top: 0.3rem;">
					<div style="color: #8A919F; font-size: 0.25rem;">收货人</div>
					<div style="font-size: 0.25rem;">{{name}}</div>
				</div>
				<div class="flexb" style="margin-top: 0.3rem;">
					<div style="color: #8A919F; font-size: 0.25rem;">收货电话</div>
					<div style="font-size: 0.25rem;">{{mobile}}</div>
				</div>
				<div class="flexb" style="margin-top: 0.3rem;">
					<div style="color: #8A919F; font-size: 0.25rem;">收货地址</div>
					<div style="width: 5rem; text-align: right; font-size: 0.25rem;">{{shengshiqu}}{{address}}</div>
				</div>
				<div class="flexcc bor" style="background: #3FCF77; color: #fff; padding: 0.2rem 0; margin-top: 0.4rem;"
					@click="guozhengtong" v-if="tijiaoing">
					<div><img src="img/w.png" style="width: 0.4rem; margin-right: 0.2rem;"></div>
					<div>微信支付</div>
				</div>
				<div class="flexcc bor" style="background: #3FCF77; color: #fff; padding: 0.2rem 0; margin-top: 0.4rem;"
					v-if="!tijiaoing">
					<div><img src="img/w.png" style="width: 0.4rem; margin-right: 0.2rem;"></div>
					<div>订单提交中...</div>
				</div>
			</van-popup> -->
			<van-popup v-model="logqueding" style="width: 90%; height: 60vh;  padding: 0.3rem; background: #fff !important; color: #333 !important; height: auto !important; border-radius: 0.1rem;">
				<div style="margin-bottom: 0.3rem;">请先阅读，并点击同意以下协议</div>
				<div style="margin-bottom: 0.3rem;">	
					<span style="color: #007AFF;font-size: 12px;" v-for="(item,index) in xieyilist" :key="item.id" @click="dakaixieyi(index)">《{{item.title}}》</span>
				</div>
				<div class="flexcc">
					<div><van-button type="default" size="small" @click="logqueding = false">不同意</van-button></div>
					<div  style="margin-left: 0.3rem;"><van-button type="info" size="small" @click="yongyi" >同意</van-button></div>
				</div>
			</van-popup>
			
			<van-action-sheet v-model="xuanhaoshow" class="xuanhao" style="padding:0;background-color:#fafafa">
			  <div class="flex" style="align-items: center;  padding: 10px 20px;background-color: white; " v-if="(item.take_number == 2 && item.mobile_config == 1)||item.take_number == 3">
			  	<div style="width: 1.6rem; overflow:hidden;">选择归属地</div>
			  	<div style="flex-grow: 1; padding-left: 0.3rem; color: #2D3038; font-size: 0.26rem; line-height:44px; position:relative;" @click="showPopup2">
			  		<div class="where">
			  			<span v-if="shengshiqu2">{{shengshiqu2}}</span>
			  			<span v-else>选择地区</span>
			  			<van-icon name="arrow" size="14" style="position: absolute; top: 0px; line-height:44px; right:0;" />
			  		</div>
			  	</div>
			  </div>
			  <div class="flexcc" style="padding-top: 0.2rem; width: 7.1rem; position: relative; padding-bottom: 1.5rem;">
					<div style="padding-left: 0.3rem; color: #2D3038; background: #F6F6F6; font-size: 0.26rem; border-radius: 22px; width: 5.7rem; position: relative;">
						<van-field v-model="shuzi" placeholder="亲，请输入您喜欢的数字" ></van-field>
						<img src="./img2/search.png" style="width: 44px; position: absolute; right: 0; top: 0;" @click="shaixuanhao(shuzi)">
						
						<van-icon name="cross" v-if="shuzi != ''" @click="shuzi = ''"  style=" position: absolute; right: 50px; top: 11px; z-index: 999;" size="20px" />
					</div>
					<div style="flex-grow: 1;" class="flexcc">
					
					  <van-icon name="checked" color="#f00"  size="20px" v-if="weihao" @click="weihaoma"></van-icon>
					  <van-icon name="circle" color="#ddd" v-if="!weihao" size="20px" @click="weihaoma"></van-icon>
					  <span style="margin-left: 0.1rem; color: #2D3038;">尾号</span>
					</div>
					<div class="ullist flexb" v-if="list != ''">
						<div class="lili" v-for="(item,index) in list" :key="index" :class="linshi == item ? 'act':''" @click="linshi = item">
							<span>{{item.toString().substring(0,3)}}</span><span style="color: #f00; margin: 0 0.1rem;">{{item.toString().substring(3,7)}}</span><span>{{item.toString().substring(7,11)}}</span>
						</div>
					</div>
					<div class="ullist flexb" style="color: #2D3038;" v-if="list == ''">
						暂无数据
					</div>
					<div v-if="item.take_number==3" class="t_fanye">
						<div v-if="pagenum!=1" style="margin-right: 20px;color: #409bfa;" @click="prepage" >上一页</div>
						<div style="margin-right: 20px;color: #409bfa;" @click="nextpage">下一页</div>
					</div>
					<div v-else @click="getlist()" v-if="list != ''" style="color: #409BFA; justify-content:flex-end; padding-right: 0.2rem;" class="flexcc">
						<img src="./img2/huanyipi.png" style="margin-right:5px; width: 17px; height: 13px;">换一批
					</div>
								
					
					
					<div style="position: fixed; left: 0; bottom:0; width: 100%; background: #fff;">
									  
									  <div style=" padding: 0.2rem; background: #FF2D4B; opacity: 0.5; color: #fff; text-align: center; border-radius: 22px; margin: 0.2rem 0.3rem;" v-if="!linshi">确认选择</div>
									  <div style=" padding: 0.2rem; background: #FF2D4B; color: #fff; text-align: center; border-radius: 22px; margin: 0.2rem 0.3rem;" v-if="linshi" @click="querenxuanhao">确认选择</div>
					</div>
			  </div>
			  
			  
			</van-action-sheet>
			<van-popup v-model="baocuolog" style="width: 90%; height: 60vh;  padding: 0.3rem; background: #fff !important; color: #333 !important; height: auto !important; border-radius: 0.1rem;">
						<div style="margin: 0.3rem; text-align: center;">{{baocuo}}</div>
						
						<div class="flexcc" @click="baocuolog = false">
							<div style="padding: 0.1rem 0.2rem;
			background: rgb(255, 45, 75);
			color: rgb(255, 255, 255);
			text-align: center;
			border-radius: 5px;">确定</div>
						</div>
					</van-popup>
			<van-popup v-model="jiazaizhong" :close-on-click-overlay="false"><van-loading type="spinner" color="#fff" /></van-popup>
		</div>




		<script>
			var h = document.documentElement.clientWidth / 7.5 + 'px';
			document.documentElement.style.fontSize = h;


			new Vue({
				el: '#app',
				data: function() {
					return {
						log1:false,
						log1html:"",
						log2:false,
						log3:false,
						checked:false,
						xuanzhongdeindex:-1,
						areaList: "",
						shengshiqu: "点击选择所在地区",
						show: false,
						yzm: "获取验证码",
						yzmnum: 60,
						yzmuse: false,
						
						apis:"",
						peizhi:"",
						item:{
							created_at: "",
							delivery_area: [],
							delivery_city: [],
							details: "",
							footer: "",
							id: "",
							json: "",
							on_sale: 0,
							order: 0,
							page_id: 0,
							page_source: "",
							pages: [],
							pic: "",
							pick_number: 0,
							price: "0.00",
							sale_name: "",
							seller_id: "",
							tab: "",
							updated_at: "",
							shouhuot1:"",
							shouhuot2:"",
							shouhuot3:""
						},
						all:{
							id:"",
							id_name:"",
							id_num:"",
							name:"",
							mobile:"",
							code:"",
							
							address:"",
							province:"",
							city:"",
							district:"",
							
							face_url:"",
							back_url:"",
							hand_url:"",
							openid:"",
							pay_method:""//	1	是	string	1微信2支付宝
						},
						pinglunlist:[],
						tijiaoing:true,
						xieyilist:"",
						logqueding:false,
						
						weihao:false,
						xuanhaoshow:false,
						all2:{
							province:"",
							city:"",
							district:"",
						},
						show2:false,
						shengshiqu2:"",
						jiazaizhong:true,
						list:[],
						list2:[],
						shuzi:"",
						linshi:"",
						hong:false,
						hong2:false,
						pagenum:1,
						baocuo:"",
						baocuolog:false,
						
						xuyaozhifu:false,
						zhifudeshow:false,
						payGateWay:""
					}
				},
				async created() {
					
					
					
					
					
					// https://static.91haoka.cn/areanew.json
					// https://static.91haoka.cn/tongyidiqu.json
					await axios.get("https://static.91haoka.cn/areanew.json")
						.then(response=> {
							this.areaList = response.data
						})
					var that = this
					this.id = this.getUrlParam('id')	
					this.all.id = this.getUrlParam('id')	
	
					if (location.href.includes('localhost')) {
						this.apis = '/apis'
					}
					
					this.getpeizhi()
					
					var wx = window.navigator.userAgent.toLowerCase();
					if (wx.match(/MicroMessenger/i) == 'micromessenger') {
						this.all.pay_method = 3 
						let url = encodeURIComponent(window.location.origin + window.location.pathname + `?id=${this.id}` ) 
						if (this.getUrlParam('code')) {
							this.code = this.getUrlParam('code')
							axios.get(`${this.apis}/api/wechat/code2token?code=${this.code}&id=${this.id}`)
							    .then(response => {
							        if(response.data.msg.code == 0){
										if(response.data.data.errcode){
											axios.get(`${this.apis}/api/wechat/code?id=${this.id}&url=${url}`)
											    .then(response => {
											        if(response.data.msg.code == 0){
											            window.location.href = response.data.data
											        }else{
											            vant.Toast(response.data.msg.info);
											        }
											    })
										}
							            this.all.openid = response.data.data.openid
							        }else{
										vant.Toast(response.data.msg.info);
							        }
							    })
						} else {
							axios.get(`${this.apis}/api/wechat/code?id=${this.id}&url=${url}`)
							    .then(response => {
							        if(response.data.msg.code == 0){
							            window.location.href = response.data.data
							        }else{
							            vant.Toast(response.data.msg.info);
							        }
							    })
						}
					}
					
					// var wx = window.navigator.userAgent.toLowerCase();
					// if (wx.match(/MicroMessenger/i) == 'micromessenger') {
					// 	this.all.pay_method = 3 
						
					// 	if (this.getUrlParam('code')) {
					// 		this.code = this.getUrlParam('code')
					// 		axios.get(`${this.apis}/api/wechat/code2token?code=${this.code}&id=${this.id}`)
					// 		    .then(response => {
					// 		        if(response.data.msg.code == 0){
					// 					if(response.data.data.errcode){
					// 						axios.get(`${this.apis}/api/wechat/code?url=${window.location}&id=${this.id}`)
					// 						    .then(response => {
					// 						        if(response.data.msg.code == 0){
					// 						            window.location.href = response.data.data
					// 						        }else{
					// 						            vant.Toast(response.data.msg.info);
					// 						        }
					// 						    })
					// 					}
					// 		            this.all.openid = response.data.data.openid
					// 		        }else{
					// 					vant.Toast(response.data.msg.info);
					// 		        }
					// 		    })
					// 	} else {
					// 		axios.get(`${this.apis}/api/wechat/code?url=${window.location}&id=${this.id}`)
					// 		    .then(response => {
					// 		        if(response.data.msg.code == 0){
					// 		            window.location.href = response.data.data
					// 		        }else{
					// 		            vant.Toast(response.data.msg.info);
					// 		        }
					// 		    })
					// 	}
					// }
					
				},
				mounted() {
					window.addEventListener('scroll', this.scrollToTop)
				},
				methods: {
					share_loading() {
						var that = this
						let url = window.location.href
						axios.post("/api/wechat/share", {id:this.id,url:url})
							.then((response) => {
								console.log(response)
								const status = response.status;
								const data = response.data;
								const msg = data.msg;
								if (status === 200 && msg.code === 0) {
									wx.config({
										debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
										appId: response.data.data.appId, // 必填，公众号的唯一标识
										timestamp: response.data.data.timestamp, // 必填，生成签名的时间戳
										nonceStr: response.data.data.nonceStr, // 必填，生成签名的随机串
										signature: response.data.data.signature, // 必填，签名
										jsApiList: ['updateAppMessageShareData',
											'updateTimelineShareData'] // 必填，需要使用的JS接口列表
									});
									that.share_func(response.data.data.url)
								}
							})
					},
					share_func(url) {
						var that = this
						// let url2 = encodeURIComponent(window.location.href + window.location.pathname + `?id=${this.id}` ) 
						// let url2 = encodeURIComponent(window.location.href + window.location.pathname + `?id=${this.id}` ) 
						wx.ready(function() { //需在用户可能点击分享按钮前就先调用
							wx.updateAppMessageShareData({
								title: that.item.sale_name, // 分享标题
								desc: that.item.sale_name, // 分享描述
								link: url, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
								imgUrl: that.item.details, // 分享图标
								success: function() {
									
									
								}
							});
							wx.updateTimelineShareData({
								title: that.item.sale_name, // 分享标题
								link: url, // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
								imgUrl: that.item.details, // 分享图标
								success: function() {
									
									
								}
							});
						});
					},
					tijiaofukuan:function(){
						this.xuyaozhifu = true
						this.zhifudeshow = true
					},
					zhifudeshowclose:function(){
						this.xuyaozhifu = false
						this.zhifudeshow = false
					},
					zhifufangshi:function(val){
						if(val == 1){
							var wx = window.navigator.userAgent.toLowerCase();
							if (wx.match(/MicroMessenger/i) == 'micromessenger') {
								this.all.pay_method = 3
							}else{
								this.all.pay_method = 1
							}
						}else{
							this.all.pay_method = 2
						}
						this.tijiaogo()
					},
					
					xuanzhongdeindexg:function(index){
						this.linshi = ""
						this.item.take_number = ""
						this.item.page_id = this.item.pages[index].page_id
						this.xuanzhongdeindex = index
						this.item.take_number = this.item.pages[index].take_number
						this.item.mobile_config = this.item.pages[index].mobile_config
						console.log(this.item)
						if(this.item.take_number == 1 ){
							if(this.item.mobile_config == 2){
								this.getlist()
							}
							if(this.item.mobile_config == 3){
								this.getlist()
							}
							if(this.item.mobile_config == 4){
								
							}
							if(this.item.mobile_config == 5){
								
							}
						}
						
						if(this.item.take_number == 2){
							if(this.item.mobile_config == 2){
								this.getlist()
							}
						}
						
						if(this.item.take_number == 3){
							
						}
						
					},
					querenxuanhao:function(){
						if(this.item.take_number == 1){
							this.all.pretty_number = this.linshi
							this.xuanhaoshow = false
							
							//这次不用
							// if(this.item.mobile_config == 3){
							// 	let obj = {
							// 		"id": this.item.id,
							// 		"mobile": this.linshi,
							// 		"data": {
							// 			"id_card_num":this.all.id_num,
							// 			"address_province": this.all2.province,
							// 			"address_province_code": this.all2.provincecode,
							// 			"address_city": this.all2.city,
							// 			"address_city_code": this.all2.citycode,
							// 			"address_district": this.all2.district,
							// 			"address_district_code": this.all2.districtcode,
							// 			"num_city_code":this.all.num_city_code
							// 		}
							// 	}
							// 	axios.post(`${this.apis}/api/plan-market/upstream/take/number2`,obj).then(response => {
							// 			if (response.data.msg.code == 0) {
							// 				this.all.pretty_number = this.linshi
							// 				this.xuanhaoshow = false
							// 			} else {
							// 				vant.Toast(response.data.msg.info);
											
							// 			}			
							// 		})
							// }
							// if(this.item.mobile_config == 4){
							// 	let check_code = ''
							// 	if(this.linshi){
							// 		Object.keys(this.mobile_config4).map((key,value)=>{
							// 			if(this.mobile_config4[key] == this.linshi){
							// 				check_code = key
							// 			}
							// 		})
							// 	}
							// 	let obj = {
							// 		"id": this.item.id,
							// 		"mobile": this.linshi,
							// 		"data": {
							// 			"id_card_num":this.all.id_num,
							// 			"address_province": this.all2.province,
							// 			"address_province_code": this.all2.provincecode,
							// 			"address_city": this.all2.city,
							// 			"address_city_code": this.all2.citycode,
							// 			"address_district": this.all2.district,
							// 			"address_district_code": this.all2.districtcode,
							// 			'check_code':check_code
							// 		}
							// 	}
							// 	Object.keys(this.mobile_config4canshu).map((key,value)=>{
							// 		obj.data[key] = this.mobile_config4canshu[key]
							// 	})
							// 	axios.post(`${this.apis}/api/plan-market/upstream/take/number2`,obj).then(response => {
							// 			if (response.data.msg.code == 0) {
							// 				this.all.pretty_number = this.linshi
							// 				this.xuanhaoshow = false
							// 			} else {
							// 				vant.Toast(response.data.msg.info);
							// 			}			
							// 		})
							// }
							// if(this.item.mobile_config == 5){
							// 	let obj = {
							// 		"id": this.item.id,
							// 		"mobile": this.linshi,
							// 		"data": {
							// 			"id_card_num":this.all.id_num,
							// 			"address_province": this.all2.province,
							// 			"address_province_code": this.all2.provincecode,
							// 			"address_city": this.all2.city,
							// 			"address_city_code": this.all2.citycode,
							// 			"address_district": this.all2.district,
							// 			"address_district_code": this.all2.districtcode,
							// 		}
							// 	}
							// 	Object.keys(this.mobile_config4canshu).map((key,value)=>{
							// 		obj.data[key] = this.mobile_config4canshu[key]
							// 	})
								
										
							// 	axios.post(`${this.apis}/api/plan-market/upstream/take/number2`,obj).then(response => {
							// 			if (response.data.msg.code == 0) {
							// 				this.all.pretty_number = this.linshi
							// 				this.xuanhaoshow = false
							// 			} else {
							// 				vant.Toast(response.data.msg.info);
											
							// 			}			
							// 		})
							// }
							
						}
						
						// if(this.item.take_number == 2){
						// 	let obj = {
						// 		"id": this.item.id,
						// 		"mobile": this.linshi,
						// 		"data": {
						// 			"id_card_num":this.all.id_num,
						// 			"address_province": this.all2.province,
						// 			"address_province_code": this.all2.provincecode,
						// 			"address_city": this.all2.city,
						// 			"address_city_code": this.all2.citycode,
						// 			"address_district": this.all2.district,
						// 			"address_district_code": this.all2.districtcode
						// 		}
						// 	}
									
						// 	axios.post(`${this.apis}/api/plan-market/upstream/take/number2`,obj).then(response => {
						// 			if (response.data.msg.code == 0) {
						// 				this.all.pretty_number = this.linshi
						// 				this.xuanhaoshow = false
						// 			} else {
						// 				vant.Toast(response.data.msg.info);
										
						// 			}			
						// 		})
						// }
						
						// if(this.item.take_number == 3){
						// 	this.all.pretty_number = this.linshi
						// 	this.xuanhaoshow = false
						// }
					},
					//上一页
					prepage(){
						if(this.pagenum!=1){
							this.pagenum--
							this.getlist(this.pagenum)
						}
					},
					//下一页
					nextpage(){
						this.pagenum++
						this.getlist(this.pagenum)
					},
					
					getlist:function(page_num){
						// this.all.pretty_number = ''
						this.linshi = ''
						let obj = {
							"page_id": this.item.page_id,
							"data": {
								"id_card_num":this.all.id_num,
								"address_province": this.all2.province,
								"address_province_code": this.all2.provincecode,
								"address_city": this.all2.city,
								"address_city_code": this.all2.citycode,
								"address_district": this.all2.district,
								"address_district_code": this.all2.districtcode,
								"page":page_num
							}
						}
						axios.post(`${this.apis}/api/store/query/number`,obj).then(response => {
								if (response.data.msg.code == 0) {
								
									if(this.item.take_number == 1){
										
										if(this.item.mobile_config == 3){
											this.list = response.data.data.arr
											this.list2 = response.data.data.arr
											this.all.num_city_code = response.data.data.num_city_code
										}
										
										if(this.item.mobile_config == 2){
											this.list = response.data.data
											this.list2 = response.data.data
										}
										
										if(this.item.mobile_config == 1){
											this.list = response.data.data
											this.list2 = response.data.data
										}
										
										if(this.item.mobile_config == 4){
											Object.keys(response.data.data).map((key,value)=>{
												if(key != 'arr'){
													this.$set(this.all,key,response.data.data[key])
													this.$set(this.mobile_config4canshu,key,response.data.data[key])
												}else{
													this.list = []
													this.list2 = []
													this.mobile_config4 = response.data.data.arr
													Object.keys(this.mobile_config4).map((key,value)=>{
														this.list.push(this.mobile_config4[key])
														this.list2.push(this.mobile_config4[key])
													})
												}
											}) 
										}
										
										if(this.item.mobile_config == 5){
											Object.keys(response.data.data).map((key,value)=>{
												if(key != 'arr'){
													this.$set(this.all,key,response.data.data[key])
													this.$set(this.mobile_config4canshu,key,response.data.data[key])
												}else{
													this.list = response.data.data.arr
													this.list2 = response.data.data.arr
												}
											}) 
										}
									}else{
										this.list = response.data.data
										this.list2 = response.data.data
									}
									
								} else {
									vant.Toast(response.data.msg.info);
									
								}			
							})
					},
					xuanhaokai:function(){
						
						
					// 	if(this.item.take_number == 2){
					// 		var id=/^[1-9][0-9]{5}(19|20)[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}([0-9]|x|X)$/;
					// 		if( id.test(this.all.id_num) != true){
					// 			this.hong = true
					// 			vant.Toast('请填写正确的身份证号码后方可选号！');
					// 			return false
					// 		}
							
					// 		if(this.item.mobile_config == 1){
					// 			if(this.shengshiqu2 == '' || this.shengshiqu2 == '点击选择所在地区'){
					// 				this.shengshiqu2 = this.shengshiqu
					// 				this.all2 = {
					// 					province: this.all.province,
					// 					provincecode: this.all.provincecode,
					// 					city: this.all.city,
					// 					citycode: this.all.citycode,
					// 					district: this.all.district,
					// 					districtcode: this.all.districtcode
					// 				}
									
					// 				if(this.all.province == ''){
					// 					if(this.all.province == ''){
					// 						this.hong2 = true
					// 					}
					// 					vant.Toast('请填写正确的收货地址后方可选号！');
					// 					return false
					// 				}
									
					// 				this.getlist()
					// 				this.xuanhaoshow = true
					// 			}else{
					// 				this.getlist()
					// 				this.xuanhaoshow = true
					// 			}
					// 		}
					// 		if(this.item.mobile_config == 2){
					// 			this.getlist()
					// 			this.xuanhaoshow = true
					// 		}
							
					// 	}
					
						
					// 	if(this.item.take_number == 3){
					// 		if(this.item.mobile_config == 1){
					// 			if(this.shengshiqu2 == '' || this.shengshiqu2 == '点击选择所在地区'){
					// 				this.shengshiqu2 = this.shengshiqu
					// 				this.all2 = {
					// 					province: this.all.province,
					// 					provincecode: this.all.provincecode,
					// 					city: this.all.city,
					// 					citycode: this.all.citycode,
					// 					district: this.all.district,
					// 					districtcode: this.all.districtcode
					// 				}
									
					// 				if(this.all.province == ''){
					// 					if(this.all.province == ''){
					// 						this.hong2 = true
					// 					}
					// 					vant.Toast('请填写正确的收货地址后方可选号！');
					// 					return false
					// 				}else{
					// 					this.getlist()
					// 					this.xuanhaoshow = true
					// 				}
					// 			}
					// 		}
					// 		if(this.item.mobile_config == 2){
							
					// 			this.xuanhaoshow = true
					// 		}
					// 		if(this.item.mobile_config == 3){
					// 			this.xuanhaoshow = true
					// 		}
					// 	}
						
						if(this.item.take_number == 1){
							
							if(this.item.mobile_config == 1){
								console.log(this.shengshiqu2)
								if(this.shengshiqu2 == '' || this.shengshiqu2 == '点击选择所在地区'){
									this.shengshiqu2 = this.shengshiqu
									this.all2 = {
										province: this.all.province,
										provincecode: this.all.provincecode,
										city: this.all.city,
										citycode: this.all.citycode,
										district: this.all.district,
										districtcode: this.all.districtcode
									}
									
									if(this.all.province == ''){
										if(this.all.province == ''){
											this.hong2 = true
										}
										vant.Toast('请填写正确的收货地址后方可选号！');
										return false
									}else{
										this.getlist()
										this.xuanhaoshow = true
									}
								}else{
									this.getlist()
									this.xuanhaoshow = true
								}
							}
							
							if(this.item.mobile_config == 2){
								this.xuanhaoshow = true
							}
							if(this.item.mobile_config == 3){
								this.xuanhaoshow = true
							}
							if(this.item.mobile_config == 4){
								if(this.shengshiqu2 == '' || this.shengshiqu2 == '点击选择所在地区'){
									this.shengshiqu2 = this.shengshiqu
									this.all2 = {
										province: this.all.province,
										provincecode: this.all.provincecode,
										city: this.all.city,
										citycode: this.all.citycode,
										district: this.all.district,
										districtcode: this.all.districtcode
									}
									
									if(this.all.province == ''){
										if(this.all.province == ''){
											this.hong2 = true
										}
										vant.Toast('请填写正确的收货地址后方可选号！');
										return false
									}else{
										this.getlist()
										this.xuanhaoshow = true
									}
								}else{
									this.getlist()
									this.xuanhaoshow = true
								}
								
							}
							if(this.item.mobile_config == 5){
								if(this.shengshiqu2 == '' || this.shengshiqu2 == '点击选择所在地区'){
									this.shengshiqu2 = this.shengshiqu
									this.all2 = {
										province: this.all.province,
										provincecode: this.all.provincecode,
										city: this.all.city,
										citycode: this.all.citycode,
										district: this.all.district,
										districtcode: this.all.districtcode
									}
									
									if(this.all.province == ''){
										if(this.all.province == ''){
											this.hong2 = true
										}
										vant.Toast('请填写正确的收货地址后方可选号！');
										return false
									}else{
										this.getlist()
										this.xuanhaoshow = true
									}
								}else{
									this.getlist()
									this.xuanhaoshow = true
								}
							}
						}
						
					},
					shaixuanhao:function(shuzi){
						
						if(this.weihao){
							if(this.shuzi.length > 4){
								vant.Toast('尾号检索请输入少于四位数字');
								return false
							}
							if(this.weihao){
								let list2 = this.list2 
								this.list = list2.filter(item=>item.toString().substring(7,11).includes(this.shuzi))
							}
						}else{
							let list2 = this.list2
							this.list = list2.filter(item=>item.toString().includes(shuzi))
							
						}
					},
					weihaoma:function(){
						if(this.shuzi.length > 4){
							vant.Toast('尾号检索请输入少于四位数字');
							return false
						}
						this.weihao = !this.weihao
						if(this.weihao){
							let list2 = this.list2 
							this.list = list2.filter(item=>item.toString().substring(7,11).includes(this.shuzi))
						}
						console.log(this.weihao)
					},
					
					// //弹出省市区
					// showPopup: function() {
								
					// 	this.hong2 = false
					// 	this.show = true
					// },
					
					// //省市区确认
					// queren: function(v) {
						
					// 	console.log(v)
					// 	if (!v[0].code || !v[1].code || !v[2].code) {
					// 		vant.Toast('请完整选择省市区');
					// 		return false
					// 	}
					// 	this.all.province = v[0].name
					// 	this.all.provincecode = v[0].code
					// 	this.all.city = v[1].name
					// 	this.all.citycode = v[1].code
					// 	this.all.district = v[2].name
					// 	this.all.districtcode = v[2].code
						
					// 	this.shengshiqu = this.all.province + '  ' + this.all.city + '  ' + this.all.district
						
					// 	this.show = false
					// },
					// //省市区取消
					// quxiao: function() {
					// 	this.show = false
					// },
					
					
					//弹出省市区
					showPopup2: function() {
						this.show2 = true
					},
					queren2: function(v) {
						if (!v[0].code || !v[1].code || !v[2].code) {
							vant.Toast('请完整选择省市区');
							return false
						}
						this.all2.province = v[0].name
						this.all2.provincecode = v[0].code
						this.all2.city = v[1].name
						this.all2.citycode = v[1].code
						this.all2.district = v[2].name
						this.all2.districtcode = v[2].code
						
						this.shengshiqu2 = this.all2.province + '  ' + this.all2.city + '  ' + this.all2.district
						
						this.show2 = false
						
					
						if(this.item.take_number==3){
							this.getlist(1)
							this.pagenum = 1
						}else{
							this.getlist()
						}
						
					},
					//省市区取消
					quxiao2: function() {
						this.show2 = false
					},
					dakaixieyi:function(index){
						this.log1html = this.xieyilist[index].content
						this.log1 = true
					},
					getNewArray:function(array, subGroupLength){
						  let index = 0;
						  let newArray = [];
						  while(index < array.length) {
							  console.log(index)
						      newArray.push(array.slice(index, index += subGroupLength));
						  }
						  return newArray;
					},
					getpinglun:function(id){
						
						axios.get(`${this.apis}/api/mini/comment/list?temp_id=${id}`)
						.then(response => {
							this.pinglunlist = response.data.data
							
							let time = moment().subtract(this.pinglunlist.length * parseInt(Math.random()*10),'minutes')
							if(this.pinglunlist != ''){
								this.pinglunlist.forEach((item,index)=>{
									if(item.header == ''){
										item.header = 'https://static.91haoka.cn/toux.png'
									}
									let miao = parseInt(Math.random()*60)
									if(miao < 10){
										miao = '0' + miao.toString()
									}
									time = moment(time).add(index+1 * parseInt(Math.random()*10),'minutes').format('YYYY-MM-DD HH:mm:' + miao) 
									item.created_at = moment(time).add(index+1 * parseInt(Math.random()*10),'minutes').format('HH:mm:' + miao) 
								})
								this.pinglunlist = this.getNewArray(this.pinglunlist, 2);
							}
							
							
							
						})
					},
					getpeizhi:function(){
						
						let wenjianjia = 'web-page'
						if(window.location.href.includes('storep.91haoka.cn') && this.apis == ''){
						  wenjianjia = 'web-page'
						}
						if(window.location.href.includes('store.91haoka.cn') && this.apis == ''){
						  wenjianjia = 'test-web-page'
						}
						if(window.location.href.includes('localhost')){
						  wenjianjia = 'test-web-page'
						}
						axios.get(`https://file.91haoka.cn/${wenjianjia}/${this.id}.json?v=${Math.random()}`)
						// axios.get(`${this.apis}/storage/web-page/${this.id}.json?v=${Math.random()}`)
						.then(response => {
							this.peizhi = JSON.parse(response.data)
							
							if(this.peizhi.pinglun == 1 && this.peizhi.pinglunid){
								this.getpinglun(this.peizhi.pinglunid)
							}
							
							if(this.peizhi.bufahuodiqu == 1){
								// let data = this.areaList.province_list
								// let data2 = this.areaList.city_list
															
								// let obj = {}
								// let obj2 = {}
								// if(this.peizhi.delivery_city){
								// 	this.peizhi.delivery_city.forEach(items => {
																
								// 		Object.keys(data).map((key1, item1) => {
								// 			if (items[0] == key1) {
								// 				obj[key1] = data[key1]
								// 			}
								// 		})
																
																
								// 		Object.keys(data2).map((key2, item2) => {
								// 			if (items[1] == key2) {
								// 				obj2[key2] = data2[key2]
								// 			}
								// 		})
																
								// 	})
								// 	this.areaList.province_list = obj
								// 	this.areaList.city_list = obj2
								// }					
								let data = this.areaList.province_list
								let data2 = this.areaList.city_list
								let data3 = this.areaList.county_list							
								
								if(this.peizhi.delivery_city != ''){
									let obj = {}
									let obj2 = {}
									let obj3 = {}
									this.peizhi.delivery_city.forEach(items => {
										
										if(items[0]){
											Object.keys(data).map((key1, item1) => {
												if (items[0] == key1) {
													obj[key1] = data[key1]
												}
											})
										}
										if(items[1]){
											Object.keys(data2).map((key2, item2) => {
												if (items[1] == key2) {
													obj2[key2] = data2[key2]
												}
											})
										}			
										if(items[2]){
											Object.keys(data3).map((key3, item3) => {
												if (items[2] == key3) {
													obj3[key3] = data3[key3]
												}
											})
										}	
																
									})
									
									this.areaList.province_list = obj
									this.areaList.city_list = obj2
									this.areaList.county_list = obj3
								}
								
							}
							if (this.peizhi.bufahuodiqu == 3) {
								let data = JSON.parse(JSON.stringify(this.areaList.province_list)) 
								let data2 = JSON.parse(JSON.stringify(this.areaList.city_list))
								let data3 = JSON.parse(JSON.stringify(this.areaList.county_list))
								// console.log(this.peizhi.bufahuosheng)
								// this.peizhi.bufahuosheng.forEach(items => {
								// 	Object.keys(data).map((key1, item1) => {
								// 		if (items == key1) {
								// 			delete this.areaList.province_list[items]
								// 		}
								// 	})			
								// })
								// this.peizhi.no_city.forEach(items => {											
								// 	Object.keys(data2).map((key2, item2) => {
								// 		if (items[1] == key2) {
								// 			delete this.areaList.city_list[key2]
								// 		}
								// 	})					
								// })
								
								// console.log(this.areaList.province_list)
								// console.log(this.areaList.city_list)
								this.peizhi.no_city.forEach(items => {
									Object.keys(data3).map((key3, item3) => {
										if (items[2] == key3) {
											delete this.areaList.county_list[key3]
										}
									})			
									
								})
							}
							this.share_loading()
						})
						axios.get(`${this.apis}/api/page/info3?id=${this.id}`)
						.then(response => {
							this.item = response.data.data
							if(this.item.network_access_protocol == 1){
								if(this.item.protocol_check){
									this.checked = true
								}
								//获取协议
								axios.get(`${this.apis}/api/network-process-protocol/info?id=${this.item.protocol_id}`)
								.then(response => {
									this.xieyilist = response.data.data
								})
							}
							document.title = response.data.data.sale_name
							// this.item.json = JSON.parse(this.item.json)
							// this.is_need_photo = this.person.is_need_photo
							//选号相关
							
							this.jiazaizhong = false
						})
						
					},
					
					
					
					dataURLtoFile(dataurl, filename) {
					  let arr = dataurl.split(","),
					    mime = arr[0].match(/:(.*?);/)[1],
					    bstr = atob(arr[1]),
					    n = bstr.length,
					    u8arr = new Uint8Array(n);
					  while (n--) {
					    u8arr[n] = bstr.charCodeAt(n);
					  }
					  return new File([u8arr], filename, {
					    type: mime
					  });
					},
					uploadok: function(file,who) {
					  var that = this;
					  var reader = new FileReader()
					  var img = new Image();
					  reader.onload = function(e) {
					    img.src = e.target.result;
					  };
					  var canvas = document.createElement('canvas');
					  var context = canvas.getContext('2d');
					  // base64地址图片加载完毕后
					  let p = new Promise((r, j) => {
					    img.onload = function() {
					      // 图片原始尺寸
					      var originWidth = this.width;
					      var originHeight = this.height;
					      // 最大尺寸限制
					      var maxWidth = 1920,
					        maxHeight = 1080;
					      // 目标尺寸
					      var targetWidth = originWidth,
					        targetHeight = originHeight;
					      // 图片尺寸超过400x400的限制
					      if (originWidth > maxWidth || originHeight > maxHeight) {		              if (originWidth / originHeight > maxWidth / maxHeight) {
					           // 更宽，按照宽度限定尺寸                  targetWidth = maxWidth;                  targetHeight = Math.round(maxWidth * (originHeight / originWidth));
					          } else {                  targetHeight = maxHeight;
					           targetWidth = Math.round(maxHeight * (originWidth / originHeight));		              }
					      }
					      // canvas对图片进行缩放
					      canvas.width = targetWidth;
					      canvas.height = targetHeight;
					      // 清除画布
					      context.clearRect(0, 0, targetWidth, targetHeight);
					      // 图片压缩
					      context.drawImage(img, 0, 0, targetWidth, targetHeight);
					
					      let base64 = canvas.toDataURL("image/jpeg", 0.8); // 压缩后的base64图片
					      let file2 = that.dataURLtoFile(base64, Date.parse(Date()) + ".jpg");
						  r(file2)
					    };
					  })
					  reader.readAsDataURL(file);
					  p.then(files => {
						  
						  axios.post(`${this.apis}/api/qiniu/token`,{bucket:"gth"})
						  	.then(response => {
						  	var qiniudata = new FormData();
						  		qiniudata.append('file', files);
						  		qiniudata.append('token',response.data.data);
						  		
						  		axios.post('https://upload.qiniup.com',qiniudata)
						  			.then(response => {
						  				this.all[who] = 'https://pic.91haoka.cn/' + response.data.key
						  			})
						  })
						  
					    // var formData = new FormData();
					    // formData.append("file", files);
					    // formData.append("type", 'pic');
					    // axios.post(`${this.apis}/api/system/upload`, formData)
					    //   .then(response => {
					    //     if (response.data.msg.code == 0) {
					    //       that.img = response.data.data
					    //       that.$emit('getimg', response.data.data)
					    //     } else {
					    //       that.$message.error(response.data.msg.info);
					    //     }
					    //   })
					  })
					},
					
					afterRead1: function(file) {
						this.uploadok(file.file,'face_url')
						// axios.post(`${this.apis}/api/qiniu/token`,{bucket:"gth"})
						// 	.then(response => {
						// 	var qiniudata = new FormData();
						// 		qiniudata.append('file', file.file);
						// 		qiniudata.append('token',response.data.data);
								
						// 		axios.post('https://upload.qiniup.com',qiniudata)
						// 			.then(response => {
						// 				this.all.face_url = 'https://pic.91haoka.cn/' + response.data.key
						// 			})
						// })
					},
					afterRead2: function(file) {
						this.uploadok(file.file,'back_url')
						// axios.post(`${this.apis}/api/qiniu/token`,{bucket:"gth"})
						// 	.then(response => {
						// 	var qiniudata = new FormData();
						// 		qiniudata.append('file', file.file);
						// 		qiniudata.append('token',response.data.data);
						// 	axios.post('https://upload.qiniup.com',qiniudata)
						// 		.then(response => {
						// 			this.all.back_url = 'https://pic.91haoka.cn/' + response.data.key
						// 		})
						// })
					},
					afterRead3: function(file) {
						this.uploadok(file.file,'hand_url')
						// axios.post(`${this.apis}/api/qiniu/token`,{bucket:"gth"})
						// 	.then(response => {
						// 	var qiniudata = new FormData();
						// 		qiniudata.append('file', file.file);
						// 		qiniudata.append('token',response.data.data);
						// 	axios.post('https://upload.qiniup.com',qiniudata)
						// 		.then(response => {
						// 			this.all.hand_url = 'https://pic.91haoka.cn/' + response.data.key
						// 		})
						// })
					},
					//获取url的code用
					getUrlParam: function(name) {
						var query = window.location.search.substring(1);
						var vars = query.split("&");
						for (var i = 0; i < vars.length; i++) {
							var pair = vars[i].split("=");
							if (pair[0] == name) {
								return pair[1];
							}
						}
						return (false);
					},
					//获取url的code用
					getUrlParam: function(name) {
						var query = window.location.search.substring(1);
						var vars = query.split("&");
						for (var i = 0; i < vars.length; i++) {
							var pair = vars[i].split("=");
							if (pair[0] == name) {
								return pair[1];
							}
						}
						return (false);
					},
			// 		scrollToTop() {
			// 			var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body
			// 				.scrollTop;
			
			// 			if (scrollTop > 1000) {
			// 				this.scrollTopshow = true
			// 			} else {
			// 				this.scrollTopshow = false
			// 			}
			// 		},
			// 		backtop: function() {
			// 			window.scrollTo(0, 376);
			// 		},
					
					//支付
					// fukuan: function() {
					// 	this.dialog = false
					// 	this.num = 3
					// 	this.dianba = true
					// 	var that = this
					// 	axios.post(this.urls + '/api/recharge/hua-pay', {
					// 			mobile: this.input,
					// 			product_id: this.li,
					// 			payment_method: "wx_mp"
					// 		})
					// 		.then(response => {
					// 			if (response.data.msg.code == 0) {
					// 				WeixinJSBridge.invoke(
					// 					'getBrandWCPayRequest', {
					// 						"appId": "wx2d18b51e3875af9a",
					// 						'timeStamp': response.data.data.payInfo.timeStamp,
					// 						'nonceStr': response.data.data.payInfo.nonceStr,
					// 						'package': response.data.data.payInfo.package,
					// 						'signType': 'MD5',
					// 						'paySign': response.data.data.payInfo.paySign,
					// 					},
					// 					function(res) {
					// 						if (res.err_msg == "get_brand_wcpay_request:ok") {}
					// 					});
					// 			} else {
					// 				that.$message.error(response.data.msg.info);
					// 			}
					// 		})
					// },
					//验证是否可以提交
					// go: function() {
					// 	if (this.mobile.length != 11) {
					// 		vant.Toast('请填写正确手机号');
					// 		return false
					// 	}
					// 	if (this.address == "" || this.name == "" || this.sheng == "") {
					// 		vant.Toast('请填写完整信息');
					// 		return false

					// 	} else {
					// 		this.show2 = true
					// 	}
					// },
					//姓名写入 出身份证
					// namewrite: function() {
					// 	this.cardshow = true
					// },
					
					//弹出省市区
					showPopup: function() {
						this.show = true
					},
					//省市区确认
					queren: function(v) {
						if (!v[0].code || !v[1].code || !v[2].code) {
							vant.Toast('请完整选择省市区');
							return false
						}
						this.all.province = v[0].name
						this.all.provincecode = v[0].code
						this.all.city = v[1].name
						this.all.citycode = v[1].code
						this.all.district = v[2].name
						this.all.districtcode = v[2].code
						
						this.shengshiqu = this.all.province + '  ' + this.all.city + '  ' + this.all.district
						
						this.show = false
					},
					//省市区取消
					quxiao: function() {
						this.show = false
					},
					//获取验证码
					getcode: function() {
						var that = this;
						if (this.all.mobile.length != 11) {
							vant.Toast("请输入正确手机号");
							return;
						}
						that.yzmnum = 60;
						that.timer = setInterval(function() {
							if (that.yzmnum == 0) {
								clearInterval(that.timer);
								that.yzm = '获取验证码';
								that.yzmuse = false
							} else {
								that.yzmuse = true
								that.yzm = that.yzmnum + '秒重新获取';
								that.yzmnum = that.yzmnum - 1;
							}
						}, 1000);
						
						axios.post(`${this.apis}/api/system/code/send`, {mobile:this.all.mobile,id:this.id})
							.then(function(response) {
								if (response.data.msg.code == 0) {
									vant.Toast("验证码已发送");
								}
							})
					},

					//验证码校验
					checkCode: function() {
						var that = this
						return new Promise((res,rej)=>{
							axios.post(`${this.apis}/api/system/code/check`,{
								mobile:this.all.mobile,
								code:this.all.code
							}).then(response => {
									if (response.data.msg.code == 0) {
										if(response.data.data){
											res('ok')
										}else{
											vant.Toast('请输入正确的验证码');
										}
										
									} else {
										vant.Toast(response.data.msg.info);
										this.tijiaoing = true
									}			
								})
						})
					},
					// qufukuan: function() {
					// 	this.show2 = true
					// },
					//国政通
					guozhengtong: function() {
						if (this.all.id_num.length != 18) {
							vant.Toast("请填写正确身份证号码！");
							return false
						}
						this.tijiaoing = false
						
						return new Promise((res,rej)=>{
							axios.post(`${this.apis}/api/id/check`,{
								name:this.all.id_name,
								id_num:this.all.id_num,
								id:this.id
							}).then(response => {
									if (response.data.msg.code == 0) {
										if(response.data.data == 'success'){
											res('ok')
										}else{
											vant.Toast('请填写正确的姓名和身份证号码');
										}
									} else {
										vant.Toast(response.data.msg.info);
										this.tijiaoing = true
									}			
								})
						})
					},
					tijiaogo:function(){
						var that = this
						
						this.jiazaizhong = true
						
						this.xuyaozhifu = false
						this.zhifudeshow = false
						
						let data = {
							id:this.all.id,//	67	是	string	无
							source_id:"",//	wq11111	是	string	无
							mobile:this.all.mobile,//	18053525846	是	string	无
							name:this.all.name,//	收件人	是	string	无
							id_name:this.all.id_name,//	王琪	是	string	无
							id_num:this.all.id_num,//	370602199401031335	是	string	无
							address:this.all.address,//	地址	是	string	无
							province:this.all.province,//	山东省	是	string	无
							city:this.all.city,//	烟台市	是	string	无
							district:this.all.district,//	莱山区	是	string	无
							pay_method:this.all.pay_method,//	1	是	string	1微信2支付宝
							page_id:this.item.pages[this.xuanzhongdeindex].page_id,//		是	string	敢探号商品id
							openid:this.all.openid,
							
							clickid:localStorage.getItem('clickid'),
							creativeid:localStorage.getItem('creativeid'),
							creativetype:localStorage.getItem('creativetype'),
							adid:localStorage.getItem('adid'),
						}
						console.log(data)
						axios.post(`${this.apis}/api/store/purchase2`, data)
							.then(response=> {
								if (response.data.msg.code == 0) {
									// vant.Toast('下单成功');
									if(this.item.pages[this.xuanzhongdeindex].unit_price == 0){
										setTimeout(()=>{
											window.location.href = '/h5/success2xinxiliu.html?page_id='+this.item.id
										},500)
									}else{
										
										if(this.all.pay_method == 1){
											setTimeout(()=>{
												window.location.href = response.data.data.h5_url
											},500)
										}
										if(this.all.pay_method == 2){
											this.payGateWay = response.data.data
											this.$nextTick(()=> {
												this.$refs.alipayWap.children[0].submit()
											})
										}
										if(this.all.pay_method == 3){
											WeixinJSBridge.invoke(
											 'getBrandWCPayRequest', {
											      "appId":response.data.data.appId,    
											      'timeStamp': response.data.data.timeStamp,
											      'nonceStr': response.data.data.nonceStr,
											      'package': response.data.data.package,
											      'signType': 'MD5',
											      'paySign': response.data.data.paySign,
											 },
											 function(res){
											 	if (res.err_msg == "get_brand_wcpay_request:ok") {
											 		//快手回调
											 		 if(that.peizhi.kuaishou){
											 			_ks_trace.push({event: 'form', convertId: that.peizhi.kuaishou, cb: function(){
											 				console.log('Your callback function here!')
											 			}})
											 			setTimeout(()=>{
											 				window.location.href = './success2xinxiliu.html?page_id='+that.item.id
											 			},500)
											 		}else{
											 		    setTimeout(()=>{
											 				window.location.href = './success2xinxiliu.html?page_id='+that.item.id
											 		    },500)
											 		}
											 	}else{
											 		that.all.pay_method = ""
											 		that.jiazaizhong = false
											 	}
											 }); 
										}
										
										// var wx = window.navigator.userAgent.toLowerCase();
										// if (wx.match(/MicroMessenger/i) == 'micromessenger') {
										// 	WeixinJSBridge.invoke(
										// 	 'getBrandWCPayRequest', {
										// 	      "appId":response.data.data.appId,    
										// 	      'timeStamp': response.data.data.timeStamp,
										// 	      'nonceStr': response.data.data.nonceStr,
										// 	      'package': response.data.data.package,
										// 	      'signType': 'MD5',
										// 	      'paySign': response.data.data.paySign,
										// 	 },
										// 	 function(res){
										// 	       if(res.err_msg == "get_brand_wcpay_request:ok" ){
										// 			    window.location.href = '/h5/success2xinxiliu.html?page_id='+this.item.id
										// 		   } 
										// 	 }); 
										// }else{
										// 	setTimeout(()=>{
										// 		window.location.href = response.data.data.h5_url
										// 	},500)
										// }
									}
									
								} else {
									vant.Toast(response.data.msg.info);
									if(response.data.msg.code == 234 || response.data.msg.code == 235 ||  response.data.msg.code == 236){
										
									}else{
										this.tijiaoing = true
									}
								}
									
							})
					},
					yongyi:function(){
						this.checked = true
						this.logqueding = false
					},
					tijiao: function() {
						if(this.peizhi.min_page && this.peizhi.max_page){
						    let arr = this.all.id_num
						    let nian = arr.substr(6,4)
						    let yue = arr.substr(10,2)
						    let ri = arr.substr(12,2)
						    let quan = nian+'-'+yue+'-'+ri
						    
						    let x = moment().subtract(this.peizhi.min_page,'years').format('YYYY-MM-DD')
						    let z = moment(quan).format('YYYY-MM-DD')
						    let y = moment().subtract(this.peizhi.max_page,'years').format('YYYY-MM-DD')
						    
						    let x1 = moment().subtract(this.peizhi.min_page,'years').format('X')
						    let z1 = moment(quan).format('X')
						    let y1 = moment().subtract(this.peizhi.max_page,'years').format('X')
						
						    if(z<x & z>y){
						    
						    }else{
						        this.baocuo = "您的年龄不符合要求，无法办理,办理年龄"+this.peizhi.min_page+'岁-'+this.peizhi.max_page+'岁'
						        this.baocuolog = true
						        return;
						    }
						}
						
						if(this.item.network_access_protocol == 1){
							if(!this.checked){
								// vant.Toast("请先阅读并同意客服协议！");
								this.logqueding = true
								return false
							}
						}
						if(this.item.network_access_protocol == 1){
							if(!this.checked){
								vant.Toast("请先阅读并同意客服协议！");
								return false
							}
						}
						if ((this.peizhi.needidcard==1 || this.peizhi.needidcard == undefined) && this.all.id_num.length != 18) {
							vant.Toast("请填写正确身份证号码！");
							return false
						}
						if (this.all.mobile.length != 11) {
							vant.Toast("请输入正确手机号");
							return;
						}
						if (!this.all.address || !this.all.province) {
							vant.Toast("请填写地址");
							return;
						}
						if(this.peizhi.shenfenzheng){
							if (!this.all.back_url || !this.all.hand_url || !this.all.face_url) {
								vant.Toast("请先上传照片");
								return;
							}
						}
						this.tijiaoing = false
						let guolist = []
						if(this.peizhi.guozhengtong){
							guolist.push(this.guozhengtong())
						}
						if(this.peizhi.duanxin){
							guolist.push(this.checkCode())
						}
						if(this.peizhi.shouhuorenxingming){
							this.all.name = this.all.id_name
						}
						console.log(this.all)
						if(guolist != ''){
							//如果需要付款
							
							Promise.all(guolist).then(()=>{
								if(this.item.pages[this.xuanzhongdeindex].unit_price != 0){
									this.xuyaozhifu = true
									this.zhifudeshow = true
								}else{
									this.tijiaogo()
								}
							})
						}else{
							if(this.item.pages[this.xuanzhongdeindex].unit_price != 0){
								this.xuyaozhifu = true
								this.zhifudeshow = true
							}else{
								this.tijiaogo()
							}
						}
					}
				}
			});
		</script>
	</body>

</html>
